namespace ghost {
	/**路径配置文件*/
	export class Conf {		
		public static root:string = "local_res/ghost/";
		public static image:string = Conf.root + "img/";
		public static role:string = Conf.root + "img/roles/";
		public static pet:string = Conf.root + "img/pet/";
		public static obj:string = Conf.root + "img/obj/";
		public static bullet:string = Conf.root + "img/obj/bullet/";
		public static buff:string = Conf.root + "img/obj/buff/";
		public static effect:string = Conf.root + "img/effect/";		
		public static uiAlias:string = Conf.root + "img/ui/";		
		public static scene:string = Conf.root + "img/ui/scene/";				
		public static num:string = Conf.root + "img/ui/num/";				
		public static num2:string = Conf.root + "img/ui/num2/";				
		public static seq:string = Conf.root + "img/ui/seq/";				
		public static skillAlias:string = Conf.root + "img/skill/";				
		public static monster:string = Conf.root + "img/monster/";
		public static mapAlias:string = Conf.root + "img/map/";
		public static sound:string = Conf.root + "sound/";
		public static dirBoard: string = Conf.uiAlias + "dirBoard/";		

		
		private static _clothesDict:any={};
		private static _actionDict:any={};
		private static _effectParamsDict:any={};
		public static blueBtn:string="barrierUI/blue.png";
		public static setClothesConfig(val:any):void
		{
			Conf._clothesDict = val;
		}
		public static setActionConfig(val:any):void
		{
			Conf._actionDict = val;
		}
		public static setEffectParamsConfig(val:any):void
		{
			Conf._effectParamsDict = val;
		}
		public static getLayerType(cfgType: number): number {			
			if (cfgType == 1)
				return map2D.LayerType.ROLE;
			if (cfgType == 2)
				return map2D.LayerType.FLOOR;
			if (cfgType == 3)
				return map2D.LayerType.TOP;
			if (cfgType == 4)
				return map2D.LayerType.ROLE_FRONT;
			if (cfgType == 5)
				return map2D.LayerType.ROLE_BACK;
		}
		/**装配特效配置
		 * @param effects 特效参数组id数组
		 * @param time 默认的出现时间，默认0
		 * @param effectType 特效类型 操控EffectType，默认EffectType.SINGLE
		*/
		public static createEffectObj(effects:number[],time:number=0,effectType:EffectType=EffectType.SINGLE):EffectArray
        {
            let arr2:EffectArray;
            let effectObj:EffectParamsCfg;
            let i:number,len:number;			
			let table:any = this._effectParamsDict;
            arr2 = [];            
            len = effects.length;
            for(i=0;i<len;++i)
            {                    
				if(!effects[i])continue;					
				if(!table[effects[i]])
					continue;					
                effectObj = new EffectParamsCfg(effectType._id, time);
				effectObj.dataSet(table[effects[i]]);
				// effectObj.bind(table, String(effects[i]));
				arr2[arr2.length] = effectObj;
            }	
            return arr2;
        }
		/**clothesID 分段说明		
		 * 1- 主角common
		 * 101-103 3种怪物 普通 加速 强力
		 * 201-205 1-5级门
		 * 301-305 1-5级床
		 * 100001-100003 冰弹 200001-200003火弹 300001-300003雷弹 
		 * 400001-400003 怪物特效 普通-加速-强力
		 * 500001-500003 buff特效 冰弹 - 火弹 - 雷弹
		 * 
		*/
		public static getClothes(clothesID:string):any
		{
			return Conf._clothesDict[clothesID];;
		}
		public static getAction(actionID:string):any
		{
			return Conf._actionDict[actionID];
		}
		
	}	
}